<?php 
	session_start();
	
	$no=$_GET['no'];
	
	include "connect.php";
	
	$query="SELECT * FROM post WHERE no=$no";
	$result=mysql_query($query);
	$row=mysql_fetch_array($result);
?>
<!DOCTYPE HTML/>
<html>
	<head>
		<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
		<?php include "include.php"?>
	</head>
	<body onload="set_menu('qna');">
		<?php include "header.php"?>
		
		<div class="container">
			<h3><i class="icon-double-angle-right"></i> Ask Friends</h3>
			<form action="modify-db.php?no=<?echo $no;?>" method="post" class="form-large">
				<table class="table table-center">
					<tr>
						<td><strong><i class="icon-asterisk"></i> Title</strong></td>
						<td colspan="3"><input type="text" name="title" class="form-control span7" value="<?echo $row[title];?>" required/></td>
					</tr>		                  				
					<tr>
						<td><strong>Lecture</strong></td>
						<td><input type="text" class="form-control"/></td>
						<td><strong>Professor</strong></td>
						<td><input type="text" class="form-control"/></td>
					</tr>
					<tr>
						<td colspan="4"><textarea name="content" class="textarea span8" required><?echo $row[content];?></textarea></td>			                  			
					</tr>

				</table>
				<input type="submit" class="btn btn-inverse pull-right" value="Save"/>
			</form>
		</div>
		<script src="js/menu.js"></script>
	</body>
</html>